#include <stdio.h>

int main(){
    printf("Enter a positive integer: ");
    int n;
    scanf("%d",&n);

    int maxprime = 0;
    for (int i=1;i<=n;i++){
        int judge=0;
        for (int j=2;j<=i;j++){
            judge = 1;
            if (i%j==0&&i!=j){
                judge =0;
                break;
            }
        }
        if (judge==1)maxprime =i;
    }
    if (maxprime==0)printf("There are no prime numbers that meet the requirements.\n");
    else{
        printf("The largest prime number that meets the requirements is %d.\n",maxprime);
    }
}